package com.woniuxy.service07;

/**
 * @author 佘赛飞
 * @create 2021 -11 -07 11:14 AM
 */
public class Student {

    private int sid;
    private String sname;

    //域属性：一个学生对应一个学校
    School school;

    public Student() {
    }

    public Student(int sid, String sname, School school) {
        this.sid = sid;
        this.sname = sname;
        this.school = school;
    }

    public int getSid() {
        return sid;
    }

    public void setSid(int sid) {
        this.sid = sid;
    }

    public String getSname() {
        return sname;
    }

    public void setSname(String sname) {
        this.sname = sname;
    }

    public School getSchool() {
        return school;
    }

    public void setSchool(School school) {
        this.school = school;
    }

    @Override
    public String toString() {
        return "Student{" +
                "sid=" + sid +
                ", sname='" + sname + '\'' +
                ", school=" + school +
                '}';
    }
}
